import request from '@/utils/request'

/**
 * 获取激活的分类树，2024年10月15日23:25:09
 */
export function getActiveTree (data, id) {
  return request({
    url: '/pc/paiContentCategory/getActiveTree/' + id,
    method: 'post',
    data
  })
}

export function getTree (data, id) {
  return request({
    url: '/pc/paiContentCategory/getTree/' + id,
    method: 'post',
    data
  })
}

export function getTreeArea (data) {
  return request({
    url: '/pc/anno/getTreeArea',
    method: 'post',
    data
  })
}

export function addCategory (data, id) {
  return request({
    url: '/pc/paiContentCategory/add/' + id,
    method: 'post',
    data
  })
}

export function updateCategory (data, id) {
  return request({
    url: '/pc/paiContentCategory/update/' + id,
    method: 'put',
    data
  })
}

export function getTablePaiContentVideo (data) {
  return request({
    url: '/pc/paiContentVideo/listByPage',
    method: 'post',
    data
  })
}

export function addContentVideo (data) {
  return request({
    url: '/pc/paiContentVideo/add',
    method: 'post',
    data
  })
}

export function updateContentVideo (data) {
  return request({
    url: '/pc/paiContentVideo/update',
    method: 'put',
    data
  })
}

export function paiContentCategoryActive (data) {
  return request({
    url: '/pc/paiContentCategory/active',
    method: 'post',
    data
  })
}

export function paiContentCategoryFrozen (data) {
  return request({
    url: '/pc/paiContentCategory/frozen',
    method: 'post',
    data
  })
}

export function paiContentVideoFrozen (data) {
  return request({
    url: '/pc/paiContentVideo/frozen',
    method: 'post',
    data
  })
}

export function paiContentVideoActive (data) {
  return request({
    url: '/pc/paiContentVideo/active',
    method: 'post',
    data
  })
}

export function getTablePaiContentMaterial (data) {
  return request({
    url: '/pc/paiContentMaterial/listByPage',
    method: 'post',
    data
  })
}

export function addPaiContentMaterial (data) {
  return request({
    url: '/pc/paiContentMaterial/add',
    method: 'post',
    data
  })
}

export function updatePaiContentMaterial (data) {
  return request({
    url: '/pc/paiContentMaterial/update',
    method: 'put',
    data
  })
}

export function paiContentMaterialFrozen (data) {
  return request({
    url: '/pc/paiContentMaterial/frozen',
    method: 'post',
    data
  })
}

export function paiContentMaterialActive (data) {
  return request({
    url: '/pc/paiContentMaterial/active',
    method: 'post',
    data
  })
}

export function getTablePaiContentCertificate (data) {
  return request({
    url: '/pc/paiContentCertificate/listByPage',
    method: 'post',
    data
  })
}

export function addPaiContentCertificate (data) {
  return request({
    url: '/pc/paiContentCertificate/add',
    method: 'post',
    data
  })
}

export function updatePaiContentCertificate (data) {
  return request({
    url: '/pc/paiContentCertificate/update',
    method: 'put',
    data
  })
}

export function paiContentCertificateFrozen (data) {
  return request({
    url: '/pc/paiContentCertificate/frozen',
    method: 'post',
    data
  })
}

export function paiContentCertificateActive (data) {
  return request({
    url: '/pc/paiContentCertificate/active',
    method: 'post',
    data
  })
}

export function getTablePaiContentAi (data) {
  return request({
    url: '/pc/paiContentAi/listByPage',
    method: 'post',
    data
  })
}

export function addPaiContentAi (data) {
  return request({
    url: '/pc/paiContentAi/add',
    method: 'post',
    data
  })
}

export function updatePaiContentAi (data) {
  return request({
    url: '/pc/paiContentAi/update',
    method: 'put',
    data
  })
}

export function paiContentAiFrozen (data) {
  return request({
    url: '/pc/paiContentAi/frozen',
    method: 'post',
    data
  })
}

export function paiContentAiActive (data) {
  return request({
    url: '/pc/paiContentAi/active',
    method: 'post',
    data
  })
}

export function getTablePaiContentOfflineCouRse (data) {
  return request({
    url: '/pc/paiContentOfflineCourse/listByPage',
    method: 'post',
    data
  })
}

export function addPaiContentOfflineCourse (data) {
  return request({
    url: '/pc/paiContentOfflineCourse/add',
    method: 'post',
    data
  })
}

export function updatePaiContentOfflineCourse (data) {
  return request({
    url: '/pc/paiContentOfflineCourse/update',
    method: 'put',
    data
  })
}

export function paiContentOfflineCourseFrozen (data) {
  return request({
    url: '/pc/paiContentOfflineCourse/frozen',
    method: 'post',
    data
  })
}

export function paiContentOfflineCourseActive (data) {
  return request({
    url: '/pc/paiContentOfflineCourse/active',
    method: 'post',
    data
  })
}

export function getTablePaiLogoListByPage (data) {
  return request({
    url: '/pc/paiLogo/paiLogo/listByPage',
    method: 'post',
    data
  })
}

export function addPaiLogo (data) {
  return request({
    url: '/pc/paiLogo/paiLogo/add',
    method: 'post',
    data
  })
}

export function updatePaiLogo (data) {
  return request({
    url: '/pc/paiLogo/paiLogo/update',
    method: 'put',
    data
  })
}

export function deletePaiLogo (data) {
  return request({
    url: '/pc/paiLogo/paiLogo/delete',
    method: 'delete',
    data
  })
}

// 人员搜索查询，2024年10月29日21:09:24
export function listUserForSearch (data) {
  return request({
    url: '/pc/user/listUserForSearch',
    method: 'post',
    data
  })
}

// 获取课程二维码，2024年12月13日18:36:08
export function getQrcodeWithCourseId (id) {
  return request({
    url: `/pc/user/getQrcodeWithCourseId/${id}`,
    method: 'get'
  })
}